<%@ include file="/common/taglibs.jsp"%>

<head>
    <title><fmt:message key="variableglobalform.title"/></title>
    <meta name="heading" content="<fmt:message key='variableglobalform.heading'/>"/>
</head>


<spring:bind path="variableGlobales.*">
    <c:if test="${not empty status.errorMessages}">
    <div class="error">
        <c:forEach var="error" items="${status.errorMessages}">
           <img src="<c:url value="/images/iconWarning.gif"/>"
               alt="<fmt:message key="icon.warning"/>" class="icon"/>
           <c:out value="${error}" escapeXml="false"/><br />
        </c:forEach>
    </div>
    </c:if>
</spring:bind>


<form:form id="variableglobalform" commandName="variableGlobales"  action="variableglobalform.html" 
	name="variableglobalform" onsubmit="return onFormSubmit(this,true)">

 <ul>

	<li>
	<label class="desc"><fmt:message key="variableglobalform.premios"/></label>
	<div class="group" style="width:450px">	

	
		<div >
		 
		  <label for="tiempo" class="required desc">
			<fmt:message key="variableglobalform.tiempomaximoventa" />
			</label>
			<form:hidden path="tiempomaximoventa"/>
			<form:input id="vaTiempomaximoventa" path="vaTiempomaximoventa"  cssclass="text small"  /><span>minutos</span>
			<form:errors path="vaTiempomaximoventa" cssClass="fieldError"/>
		</div>
	
	
	
	<div >
	
       <appfuse:label styleClass="desc" key="label.habilitado"/>
       <form:checkbox path="chkTiempomaximoventa" />
 
  
    </div>


	
		<div >
		  <label for="canjes" class="required desc">
			<fmt:message key="variableglobalform.canjemaximoventa" />
			</label>
			<form:hidden path="canjesmaximosventa"/>
			<form:input id="vaCanjesmaximosventa"  path="vaCanjesmaximosventa"    cssclass="text small" /> <span>unidades</span>
			<form:errors path="vaCanjesmaximosventa" cssClass="fieldError"/>
		</div>
	

	
	<div>
	
       <appfuse:label styleClass="desc" key="label.habilitado"/>
       <form:checkbox path="chkCanjesmaximosventa" />
 
      </div>
 
	
		<div >
		  <label for="consumo" class="required desc">
			<fmt:message key="variableglobalform.consumominimoventa" />
			</label>
			
			<form:hidden path="consumominimoventa"/>
			<form:input id="vaConsumominimoventa" path="vaConsumominimoventa" cssclass="text small" /><span>soles</span>
			<form:errors path="vaConsumominimoventa" cssClass="fieldError"/>
		</div>

	
   		<div>
	
       <appfuse:label styleClass="desc" key="label.habilitado"/>
       <form:checkbox path="chkConsumominimoventa" />
 
      	</div>
      	
      	<div >
		  <label for="diasvencimiento" class="required desc">
			<fmt:message key="variableglobalform.diasparavencimiento" />
			</label>
			<form:hidden path="diasvencimiento"/>
			<form:input id="vaDiasvencimiento" path="vaDiasvencimiento"  cssclass="text small" /><span>dias</span>
			<form:errors path="vaDiasvencimiento" cssClass="fieldError"/>
		</div>

	
   		<div>
	
       <appfuse:label styleClass="desc" key="label.habilitado"/>
       <form:checkbox path="chkDiasvencimiento" />
 
      	</div>
      	
      	
      <div >
		  <label for="tiempoesperasolcanjeporregularizar" class="required desc">
			<fmt:message key="variableglobalform.tiempoesperaregularizacion" /><span class="req">*</span>
			</label>
			<form:hidden path="tiempoesperasolcanjeporregularizar"/>
			<form:input id="vatiempoesperasolcanjeporregularizar" path="vatiempoesperasolcanjeporregularizar"  cssclass="text small" /><span>minutos</span>
			<form:errors path="vatiempoesperasolcanjeporregularizar" cssClass="fieldError"/>
		</div>



  	</div>
  	</li>
  	
  	
  	<li>
        <c:set var="buttons">
		    	
		     <input type="submit" class="button"  name="save" id="bSumit" onclick="submitPressed()"  value="<fmt:message key="button.save"/>"/>
			<input type="button" class="button" onclick="location.href='<c:url value="/mainMenu.html"/>'" value="<fmt:message key="button.cancel"/>"/>
		      
		      
	  </c:set>
      <c:out value="${buttons}" escapeXml="false"/>
    </li>
  	
  	
</ul>



		
</form:form>

<script type="text/javascript">



		Form.focusFirstElement($('variableglobalform'));
		highlightFormElements();  
		
		function onFormSubmit(theForm) {
			return validateVariableGlobales(theForm);
		}
 
</script>
<v:javascript formName="variableGlobales" staticJavascript="false" />
<script type="text/javascript" src="<c:url value="/scripts/validator.jsp"/>"></script>
